﻿<?php
/**
 * Created By Project
 * Author: 陈东
 * Copyright：陈东
 * Source Code：陈东
 * Explain：I shall not authorize for any other commercial purposes, law breakers must be prosecuted.
 */
namespace Admin\Controller;
use Think\Controller;

class LogController extends BaseController {
	/*
	 * 日志记录
	 * $recordtype 记录类型,如：1为正常操作，0为错误操作
	 */
	public function index($recordtype=1,$explain=''){
		$log = D('log');
		$data['datetimes'] = date("Y-m-d H:i:m");
		$data['userid'] = I('session.adminuser','未知');
		$data['recordtype'] = $recordtype;
		$data['explain'] = $explain;
		$result = $log->add($data);
		if($result){
			return true;
		}else{
			return false;
		}
	}

}
?>